<?php
class Insert_model extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
        $this->load->database();
    }
     
    public function insert($table,$adicional,$excluir)
    {

        $post = array();
        foreach ( $adicional as $key => $value )
        {
            $post[$key] = $value;
        }

        foreach ( $_POST as $key => $value )
        {
            $post[$key] = $this->input->post($key);
        }

        foreach ( $excluir as $key => $value )
        {
            unset($post[$value]);
        }

        $this->db->insert($table, $post);
    }
}